home *** CD-ROM | disk | FTP | other *** search
/ Hacker 19 / HACKER19.ISO / NFSGoodies / Goodies.exe / nfs4 fce format.txt < prev    next >
Text File  |  1999-06-09  |  11KB  |  308 lines

  1. =========================
  2. FCE 3D Mesh Files (*.FCE)
  3. =========================
  4.  
  5. 1) The .FCE file starts with following 8248-byte header:
  6.  
  7. -------------------------------------------------------------------------------
  8.  Offset  Length   Type            Description
  9. -------------------------------------------------------------------------------
  10.  0x0000  0x0004   ????       Value always seems to be 14 10 10 00
  11.  0x0004  0x0004   ????       Unknown purposes
  12.  
  13.  0x0008  0x0004  LONGINT     Number of triangles in model
  14.  0x000C  0x0004  LONGINT     Number of vertices in model
  15.  0x0010  0x0004  LONGINT     Number of ART's
  16.  
  17.  0x0014  0x0004  LONGINT     Vertex table offset from 0x2038
  18.  0x0018  0x0004  LONGINT     Normal table offset from 0x2038
  19.  0x001C  0x0004  LONGINT     Triangle table offset from 0x2038
  20.  
  21.  0x0020  0x0004  LONGINT     Temporary Storage #1 offset from 0x2038
  22.  0x0024  0x0004  LONGINT     Temporary Storage #2 offset from 0x2038
  23.  0x0028  0x0004  LONGINT     Temporary Storage #3 offset form 0x2038
  24.  0x002C  0x0004  LONGINT     Undamaged vertices offset from 0x2038
  25.  0x0030  0x0004  LONGINT     Undamaged normals offset from 0x2038
  26.  0x0034  0x0004  LONGINT     Damaged vertices offset form 0x2038
  27.  0x0038  0x0004  LONGINT     Damaged normals offset from 0x2038
  28.  0x003C  0x0004  LONGINT     Unknow area offset from 0x2038
  29.  0x0040  0x0004  LONGINT     Driver movements offset form 0x2038
  30.  0x0044  0x0004  LONGINT     Unknown offset from 0x2038
  31.  0x0048  0x0004  LONGINT     Unknown offset from 0x2038
  32.  
  33.  0x004C  0x0004   REAL       X half-size of whole model
  34.  0x0050  0x0004   REAL       Y half-size of whole model
  35.  0x0054  0x0004   REAL       Z half-size of whole model
  36.  
  37.  0x0058  0x0004  LONGINT     Number of dummies (Values: 0..16)
  38.  0x005C  0x00C0  Vector[16]  Co÷rdinates of dummies
  39.  
  40.  0x011C  0x0004  LONGINT     Number of car parts (Values: 0..64)
  41.  0x0120  0x0300  Vector[64]  Global co÷rdinates of car parts
  42.  
  43.  0x0420  0x0100  LONGINT[64] First vertex index for each part
  44.  0x0520  0x0100  LONGINT[64] Number of vertices for each part
  45.  0x0620  0x0100  LONGINT[64] First triangle index for each part
  46.  0x0720  0x0100  LONGINT[64]    Number of triangles for each part
  47.  
  48.  0x0820  0x0004  LONGINT     Number of colors (Values: 0..16)
  49.  0x0824  0x0040  Color[16]   Primary colors (alpha channel: RGB 224,224,224)
  50.  0x0864  0x0040  Color[16]   Interior colors (alpha channel: RGB 164,164,164)
  51.  0x08A4  0x0040  Color[16]   Secondary colors (alpha channel: RGB 96,96,96)
  52.  0x08E4  0x0040  Color[16]   Driver's hair colors (alpha channel: RGB 32,32,32)
  53.  
  54.  0x0924  0x0104   ????       Unknown purposes
  55.  
  56.  0x0A28  0x0400  Dummy[16]   Dummy object info
  57.  
  58.  0x0E28  0x1000  Part[64]    Part names
  59.  
  60.  0x1E28  0x0210   ????       Unknown purposes
  61.  
  62. -------------------------------------------------------------------------------
  63.          0x2038  -  size of header
  64. -------------------------------------------------------------------------------
  65.  
  66.  1a) Vector structure:
  67.  
  68.   ------------------------------------------------
  69.    Offset  Length   Type   Field   Description
  70.   ------------------------------------------------
  71.     0x00    0x04    REAL     X      X-coordinate
  72.     0x04    0x04    REAL     Y      Y-coordinate
  73.     0x08    0x04    REAL     Z      Z-coordinate
  74.   ------------------------------------------------
  75.              0x0C  -  size of Vector
  76.   ------------------------------------------------
  77.  
  78.  
  79.  1b) Color structure:
  80.  
  81.   ------------------------------------------------
  82.    Offset  Length   Type   Field   Description
  83.   ------------------------------------------------
  84.     0x00    0x01  SHORTINT   H      Hue
  85.     0x01    0x01  SHORTINT   S      Saturation
  86.     0x02    0x01  SHORTINT   B      Brightness
  87.     0x03    0x01  SHORTINT   T      Transparency?
  88.   ------------------------------------------------
  89.              0x04  -  size of Color
  90.   ------------------------------------------------
  91.  
  92.    Valid values for all four components: 0..255
  93.     H = hue<degrees>  / 360 * 255
  94.     S = saturation<%> / 100 * 255
  95.     B = brightness<%> / 100 * 255
  96.  
  97.  
  98.  1c) Dummy structure:
  99.   Wether a license plate or a light
  100.  
  101.    License plate: ":LICENSE"/":LICMED"/":LICLOW" (License plate in High/Medium/Low res);
  102.                   ":LICENSE_EURO" (Long license plate in High res)
  103.  
  104.    Light:
  105.   ------------------------------------------------
  106.    Offset  Length   Type   Field   Description
  107.   ------------------------------------------------
  108.     0x00    0x01    CHAR     K      Kind
  109.     0x01    0x01    CHAR     C      Color
  110.     0x02    0x01    CHAR     U      Unknown
  111.     0x03    0x01    CHAR     F      Flashing
  112.     0x04    0x01    CHAR     I      Intensity
  113.   ------------------------------------------------
  114.              0x64  -  size of Dummy
  115.   ------------------------------------------------
  116.  
  117.    Valid values for components:
  118.     K : "H" (Headlights); "T" (Taillights); "B" (Brakelight); "R" (Reverse light);
  119.         "P" (Direction indicator); "S" (Siren);
  120.     C : "W" (White); "R" (Red); "B" (Blue); "O" (Orange)
  121.     F : "O" (Flashing at moment 1); "E" (Flashing at moment 2); "N" (No flashing)
  122.     I : Number between 0 and 5 with 0 being broken
  123.  
  124.  
  125.  1d) Part structure:
  126.  
  127.    Valid values:
  128.     ":HB"   : High Body
  129.     ":HLFW" : High Left Front Wheel
  130.     ":HRFW" : High Right Front Wheel
  131.     ":HLRW" : High Left Rear Wheel
  132.     ":HRRW" : High Right Rear Wheel
  133.     ":MB"   : Medium Body
  134.     ":MLFW" : Medium Left Front Wheel
  135.     ":MRFW" : Medium Right Front Wheel
  136.     ":MLRW" : Medium Left Rear Wheel
  137.     ":MRRW" : Medium Right Rear Wheel
  138.     ":LB"   : Low Body
  139.     ":TB"   : Tiny Body
  140.     ":OC"   : Interior
  141.     ":OD"   : Driver holding steering wheel
  142.     ":OH"   : Driver head
  143.     ":ODL"  : Dash when lit
  144.     ":OLM"  : Left Mirror
  145.     ":ORM"  : Right Mirror
  146.     ":OLB"  : Left Front Brake
  147.     ":ORB"  : Right Front Brake
  148.     ":OL"   : Popup lights
  149.     ":OT"   : Top of Convertibles
  150.  
  151.  
  152. 2) Data in .FCE file from end of header = 0x2038
  153.  
  154.  2a) Table of vertices
  155.  
  156.     Offset      : Header Size + Vertex table offset
  157.     Length      : Number of Vertices * Size of Vector
  158.     Type        : Vector[Number of Vertices]
  159.  
  160.   All coordinates are local. Use values from 'Parts' table (file offset 0x0120)
  161.   to make them global.
  162.  
  163.  
  164.  2b) Table of normals
  165.  
  166.     Offset      : Header Size + Normal table offset
  167.     Length      : Number of Vertices * Size of Vector
  168.     Type        : Vector[Number of Vertices]
  169.  
  170.   These vectors should be normalized. Each normal in this table corresponds to the
  171.   vertex in the vertex table with the same index.
  172.  
  173.  
  174.  2c) Table of triangles
  175.  
  176.     Offset      : Header Size + Triangle table offset
  177.     Length      : Number of Triangles * Size of Triangle
  178.     Type        : Triangle[Number of Triangles]
  179.  
  180.    Triangle structure:
  181.  
  182.     -------------------------------------------------------------------------
  183.      Offset  Length   Type          Description
  184.     -------------------------------------------------------------------------
  185.       0x00    0x04   LONGINT     Texture page number
  186.       0x04    0x04   LONGINT     Vertex #1 index (local)
  187.       0x08    0x04   LONGINT     Vertex #2 index (local)
  188.       0x0C    0x04   LONGINT     Vertex #3 index (local)
  189.       0x10    0x0C    ????       Value always 00FF00FF00FF00FF00FF00FF
  190.       0x1C    0x04   LONGINT     Smoothing bits
  191.       0x20    0x04    REAL       Vertex #1 texture U-coordinate
  192.       0x24    0x04    REAL       Vertex #2 texture U-coordinate
  193.       0x28    0x04    REAL       Vertex #3 texture U-coordinate
  194.       0x2C    0x04    REAL       Vertex #1 texture V-coordinate
  195.       0x30    0x04    REAL       Vertex #2 texture V-coordinate
  196.       0x34    0x04    REAL       Vertex #3 texture V-coordinate
  197.     -------------------------------------------------------------------------
  198.               0x38  -  size of Triangle
  199.     -------------------------------------------------------------------------
  200.  
  201.     Vertex indices are local. Use values from 'First Vertices' table (file offset 0x0420)
  202.     to make them global.
  203.  
  204.  
  205.  2d) Temporary Storage #1
  206.  
  207.     Offset      : Header Size + Reserved #1 offset
  208.     Length      : Number of Vertices * 32
  209.     Type        : ????
  210.  
  211.  
  212.  2e) Temporary Storage #2
  213.  
  214.     Offset      : Header Size + Reserved #2 offset
  215.     Length      : Number of Vertices * 12
  216.     Type        : ????
  217.  
  218.  
  219.  2f) Temporary Storage #3
  220.  
  221.     Offset      : Header Size + Reserved #3 offset
  222.     Length      : Number of Vertices * 12
  223.     Type        : ????
  224.  
  225.  
  226.  2g) Undamaged vertices
  227.  
  228.     Offset      : Header Size + Reserved #4 offset
  229.     Length      : Number of Vertices * 12
  230.     Type        : Vector
  231.  
  232.  
  233.  2h) Undamaged normals
  234.  
  235.     Offset      : Header Size + Reserved #5 offset
  236.     Length      : Number of Vertices * 12
  237.     Type        : Vector
  238.  
  239.  
  240.  2i) Damaged vertices
  241.  
  242.     Offset      : Header Size + Reserved #6 offset
  243.     Length      : Number of Vertices * 12
  244.     Type        : Vector
  245.  
  246.  
  247.  2j) Damaged normals
  248.  
  249.     Offset      : Header Size + Reserved #7 offset
  250.     Length      : Number of Vertices * 12
  251.     Type        : Vector
  252.  
  253.  
  254.  2k) Unknown area #1
  255.  
  256.     Offset      : Header Size + Reserved #8 offset
  257.     Length      : Number of Vertices * 4
  258.     Type        : ????
  259.  
  260.  
  261.  2l) Driver movements
  262.  
  263.     Offset      : Header Size + Reserved #9 offset
  264.     Length      : Number of Vertices * 4
  265.     Type        : 4 bytes in length
  266.  
  267.  
  268.  2m) Unknown area #2
  269.  
  270.     Offset      : Header Size + Reserved #10 offset
  271.     Length      : Number of Vertices * 4
  272.     Type        : ????
  273.  
  274.  
  275.  2n) Unknown area #3
  276.  
  277.     Offset      : Header Size + Reserved #11 offset
  278.     Length      : Number of Triangles * 12
  279.     Type        : ????
  280.  
  281.  
  282.   All areas should exist. The Driver Movements keeps a value for each vertice.
  283.   This value is only used in the part ":OD". If the value for a vertex here is
  284.   00 00 00 00, the vertice will rotate when the driver turns the wheel. If it is
  285.   04 00 00 00, the vertice won't rotate.
  286.  
  287.  
  288. 3) Co÷rdinate system. From the car:
  289.  
  290.     X axis points to the right;
  291.     Y axis points upward;
  292.     Z axis points forward.
  293.  
  294.  
  295. 4) Notes
  296.  
  297.     LONGINT : long integer (32-bit)
  298.     SHORTINT: short integer (8-bit)
  299.     REAL    : floating point number (32-bit)
  300.  
  301.  
  302. 5) Copyright
  303.  
  304.     This file was based on SPECS.TXT on NFS3 released by NFSCheats.
  305.     The hacking and extensions were done by Addict.
  306.     I'm not responsible for any damage this info does to your properties.
  307.     I'm in no way affiliated with EA.
  308.